FROM centos:7
MAINTAINER Howard He "howard"

ENV  CANAL_VERSION=1.0.24
ENV  JAVA_HOME=/usr/lib/jdk1.8.0_171
ENV  JRE_HOME=${JAVA_HOME}/jre
ENV  CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
ENV  PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin:$PATH

COPY jdk-8u171-linux-x64.tar.gz /usr/lib/
RUN  cd /usr/lib &&  tar zxvf  jdk-8u171-linux-x64.tar.gz && rm -rf  jdk-8u171-linux-x64.tar.gz

#ADD https://github.com/alibaba/canal/releases/download/canal-${CANAL_VERSION}/canal.deployer-${CANAL_VERSION}.tar.gz /tmp

#RUN cd /tmp && \
#    mkdir -m 777 canal && \
#    tar zxvf canal.deployer-${CANAL_VERSION}.tar.gz -C /tmp/canal && \
#    mv canal /

COPY canal/ /canal

RUN  chmod  777 /canal/bin/startup.sh   
